package com.lifesea.news.api;

import com.lifesea.model.MedNews;
import com.lifesea.news.api.service.MedNewsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;

/**
 *
 *   资讯方法实现
 */
public class NewsApiImpl implements NewsApi{

    @Autowired
    private MedNewsService medNewsService;

    private final Logger logger = LoggerFactory.getLogger(NewsApiImpl.class);

    @Override
    public Integer count(HashMap map) {
        return medNewsService.count(map);
    }

    @Override
    public List<MedNews> findAll() {
        return medNewsService.findAll();
    }

    @Override
    public List<MedNews> findAll(HashMap map) {
        return medNewsService.findAll(map);
    }

    @Override
    public List<MedNews> findAll(HashMap map, Integer pageNumber, Integer pageSize) {
        return medNewsService.findAll();
    }

    @Override
    public MedNews findOne(Long id) {
        return medNewsService.findOne(id);
    }

    @Override
    public Integer save(MedNews record) {
        return medNewsService.save(record);
    }

    @Override
    public Integer update(MedNews medNews) {
        return medNewsService.update(medNews);
    }

    @Override
    public Integer delete(Long id) {
        return medNewsService.delete(id);
    }

    @Override
    public int remove_issuance_time(MedNews news) {
        return medNewsService.remove_issuance_time(news);
    }

    @Override
    public int praise(MedNews news) {
        return medNewsService.praise(news);
    }
}
